$(document).ready(function() {
    $(".J_RemoveRow").click(function() {
        var url = this.getAttribute("data-url");
        var data = this.getAttribute("data-config")
        $.getJSON(url, data, function(result) {
            if (result.status == 1) {
                location.reload(true);
            } else {
                alert(result.msg);
                location.reload(true);
            }
        });
    });

    $(".J_Action").click(function() {
        var url = this.getAttribute("data-url");
        var data = this.getAttribute("data-config")
        $.getJSON(url, data, function(result) {
            if (result.status == 1) {
                location.reload(true);
            }
        });
        location.reload(true);
    });

    // call the tablesorter plugin
    $("table").tablesorter({
        // sort on the first column and third column, order asc
        sortList: [
            [0,0]
        ]
    });
});